package com.nf.entity;

public class Student {
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        System.out.println("2、为Bean的属性设置值和对其他Bean的引用");
        this.name = name;
    }

    public Student() throws Exception{
        //Thread.sleep(3000);
        System.out.println("1、通过构造器或工厂方法创建Bean实例");
    }


    public void weizhuang(){
        System.out.println("3、调用Bean的初始化方法");
    }

    public void xiezhuang(){
        System.out.println("5、当容器关闭时，调用bean的销毁方法");
    }
}
